<h5>Interfacing the Wiring hardware and MaxMSP</h5>
<p>This tutorial introduces the basic interfacing between the Wiring hardware and MaxMSP <a href="http://cycling74.com">http://cycling74.com</a>. The brief for the tutorial will be to read all the analog inputs from Wiring board. It assumes the Wiring software and MaxMSP are installed and the proper Wiring setup has been previously completed. For more Information on Wiring install check out the <a href="http://wiring.org.co/learning/tutorials/">tutorials</a> about Wiring installation and software setup.</p>
<h5>Step 1</h5>
<p>Copy and paste the following code on the Wiring editor: Verify your program is free of compiling errors by pressing the Compile/Verify button in the menu bar. Press the Upload button in the menu bar. In case of syntax errors the Wiring environment will print the error messages otherwise it will print the Upload was completed successfully, the uploading process triggers activity in the Rx/Tx LEDs on the Wiring hardware. The new program will start automatically after uploading. Use the Serial Monitor button to watch the data coming from the Wiring board, then close the Serial Monitor again. The full code for the example (both Wiring &amp; MaxMSP is at the Examples -&gt; Topics -&gt; Other Software section <a href="http://wiring.org.co/learning/topics/allanaloginputsmaxmsp.html">here</a>.</p>
<pre>
void setup() 
{
  Serial.begin(9600);
}

void loop() 
{
  Serial.print(analogRead(0), DEC);
  Serial.print(",");
  Serial.print(analogRead(1), DEC);
  Serial.print(",");
  Serial.print(analogRead(2), DEC);
  Serial.print(",");
  Serial.print(analogRead(3), DEC);
  Serial.print(",");
  Serial.print(analogRead(4), DEC);
  Serial.print(",");
  Serial.print(analogRead(5), DEC);
  Serial.print(",");
  Serial.print(analogRead(6), DEC);
  Serial.print(",");
  Serial.println(analogRead(7), DEC);
  delay(100);
}
</pre>
<p>&nbsp;</p>
<h5>Step 2</h5>
<p>Next step is to setup things in MaxMSP. Start MaxMSP.</p>
<p><img src="imgs/max_01.jpg"/></p>
<p>&nbsp;</p>
<h5>Step 3</h5>
<p>Double click the working area to add objects as shown:
<code></code>
<p><img src="imgs/maxallanalogs_01.jpg" width="640" height="675" /></p>
<p>&nbsp;</p>
<h5>Step 4</h5>
<p>Connect the objects as shown: </p>
<p><img src="imgs/maxallanalogs_02.jpg" width="640" height="675" /></p>
<p>&nbsp;</p>
<h5>Step 5</h5>
<p>Routing the connections sometimes produce a more readable patch, now the patch is ready to be tested, click the lock in the status bar and then click the toggle on the patch to start sending data. Use the fucsia toggle to open/close the serial port (color fucsia), you'll see a changing background depending on the values from the first four analog sensors, the remaining are just printed as numbers for reference. Try to connect 4 potentiometers or 4 analog sensors to input 0 to 3 to modify the background color of the window.</p>
<img src="imgs/maxallanalogs_03.jpg" width="640" height="675" />
<p>&nbsp;</p>
